package com.example.demo.Controller;

import com.example.demo.Service.SecurityLineService;
import com.example.demo.entity.SecurityLine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("/security")
@RestController
public class SecLineController {
    @Autowired
    SecurityLineService securityLineService;
    @GetMapping("/query")
    public List<SecurityLine> get(){
        return securityLineService.list();
    }
    @PostMapping("/update")
    public void update(@RequestBody SecurityLine securityLine){
        securityLineService.update(securityLine,null);
    }
}
